<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:pt="http://xmlns.jcp.org/jsf/passthrough">

<h:head>
	<meta http-equiv="Content-Type" content="text/html" />
	<meta charset="utf-8" />
	<title>Login &middot; SmartSight</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta name="description" content="" />
	<meta name="author" content="" />

	<!-- Le styles -->
	<h:outputStylesheet library="css" name="bootstrap.css" />


	<style type="text/css" media="screen">
body {
	padding-top: 40px;
	padding-bottom: 40px;
	background-color: #f5f5f5;
}

.form-signin {
	max-width: 300px;
	padding: 19px 29px 29px;
	margin: 0 auto 20px;
	background-color: #fff;
	border: 1px solid #e5e5e5;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	border-radius: 5px;
	-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.form-signin .form-signin-heading, .form-signin .checkbox {
	margin-bottom: 10px;
}

.form-signin input[type="text"], .form-signin input[type="password"] {
	font-size: 16px;
	height: auto;
	margin-bottom: 15px;
	padding: 7px 9px;
}
</style>
	<h:outputStylesheet library="css" name="bootstrap-responsive.css" />
</h:head>

<h:body>
	<center>
		<div class="container" >
			<form id="login" class="form-signin" method="post"
				action="${request.contextPath}/j_spring_security_check">

				<h2 class="form-signin-heading">SmartSight</h2>
				<input type="text" class="input-block-level" name='j_username'
					placeholder="Email" /> <input type="password"
					class="input-block-level" name='j_password' placeholder="Senha" />
				
				<button class="btn btn-large btn-primary" type="submit">
					Entrar</button>
				<script>
					document.getElementById("login").j_username.value = "#{SPRING_SECURITY_LAST_USERNAME}";
			    </script>
			</form>
		</div>
		<h:panelGroup rendered="#{!empty param.login_error}">
			<span style="font-color: red"> Erro ao efetuar o login</span>
			<br />
			<br />
			<!-- Motivo: #{SPRING_SECURITY_LAST_EXCEPTION.message}  -->
		</h:panelGroup>
	</center>
	<!-- Le javascript
    ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->
	<h:outputScript library="js" name="jquery-1.11.1.min.js" />
	<h:outputScript library="js" name="bootstrap.min.js" />
	<h:outputScript library="js" name="bootstrap-transition.js" />
	<h:outputScript library="js" name="bootstrap-modal.js" />
	<h:outputScript library="js" name="bootstrap-dropdown.js" />
	<h:outputScript library="js" name="bootstrap-scrollspy.js" />
	<h:outputScript library="js" name="bootstrap-tab.js" />
	<h:outputScript library="js" name="bootstrap-tooltip.js" />
	<h:outputScript library="js" name="bootstrap-popover.js" />
	<h:outputScript library="js" name="bootstrap-button.js" />
	<h:outputScript library="js" name="bootstrap-collapse.js" />
	<h:outputScript library="js" name="bootstrap-carousel.js" />
	<h:outputScript library="js" name="bootstrap-typeahead.js" />
</h:body>

</html>
